package org.pyq.agent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author pengYongQiang
 * @date 2020/8/30 14:24
 */
@SpringBootApplication
@RestController
public class Application {
    @Autowired
    private DemoService demoService;

    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(Application.class,args);

    }

    @PostConstruct
    public void init(){
        System.out.println("spring 初始化");

    }

    @RequestMapping("a")
    public String a(String a){
        String s = demoService.demo1();
        System.out.println(s);
        System.out.println(123);
        return "s -- "+s;
    }
}
